﻿<!DOCTYPE html>
<html>
<head>
	<title>Microsoft Ajax 4.0 Preview 6</title>

	<script type="text/javascript" src="Scripts/MicrosoftAjax.debug.js"></script>

	<script type="text/javascript" src="Scripts/MicrosoftAjaxTemplates.debug.js"></script>

	<script type="text/javascript" src="Scripts/TreeDeclarative.js"></script>

	<link type="text/css" rel="Stylesheet" href="Styles/StyleSheet.css" />
</head>
<body xmlns:sys="javascript:Sys" xmlns:dataview="javascript:Sys.UI.DataView">
	<div>
		<ul id="tree" class="tree" sys:attach="dataview" dataview:data="{{ Type.getRootNamespaces() }}"
			dataview:itemtemplate="#nodeTemplate" dataview:oncommand="{{ onCommand }}">
		</ul>
		<ul id="nodeTemplate" class="sys-template">
			<li><a class="toggleButton" href="#" sys:if="Type.isNamespace($dataItem)" onclick="return toggleVisibility(this);">
				+</a> <a href="#" onclick="return false;" sys:command="select">{{ getSimpleName($dataItem.getName())
					}} </a>
				<ul sys:attach="dataview" dataview:data="{{ getChildren($dataItem) }}" dataview:itemtemplate="#nodeTemplate"
					dataview:oncommand="{{ onCommand }}">
				</ul>
			</li>
		</ul>
		<div id="details" class="details sys-template" sys:attach="dataview" dataview:onitemrendering="{{ onDetailsRendering }}">
		</div>
		<div id="namespaceTemplate" class="sys-template">
			<h1>
				{{ $dataItem.getName() }}</h1>
			<div class="column">
				<h2>
					Namespaces:</h2>
				<ul sys:id="namespacePlaceHolder" sys:attach="dataview" dataview:data="{{ getChildren($dataItem) }}"
					dataview:itemtemplate="#namespaceChildTemplate" dataview:onitemrendering="{{ onNamespaceChildRendering }}">
				</ul>
			</div>
			<div class="column">
				<h2>
					Classes:</h2>
				<ul>
					<li sys:id="classPlaceHolder"></li>
				</ul>
			</div>
		</div>
		<ul id="namespaceChildTemplate" class="sys-template">
			<li>{{ $dataItem.getName() }}</li>
		</ul>
		<div id="classTemplate" class="sys-template">
			<h1>
				{{ $dataItem.getName() }}</h1>
			<div class="column">
				<h2>
					Properties:</h2>
				<ul sys:id="propertyPlaceHolder" sys:attach="dataview" dataview:data="{{ getMembers($dataItem) }}"
					dataview:itemtemplate="#classChildTemplate" dataview:onitemrendering="{{ onClassMemberRendering }}">
				</ul>
			</div>
			<div class="column">
				<h2>
					Events:</h2>
				<ul>
					<li sys:id="eventPlaceHolder"></li>
				</ul>
			</div>
			<div class="column">
				<h2>
					Methods:</h2>
				<ul>
					<li sys:id="methodPlaceHolder"></li>
				</ul>
			</div>
			<div class="column">
				<h2>
					Static Methods:</h2>
				<ul>
					<li sys:id="staticMethodPlaceHolder"></li>
				</ul>
			</div>
		</div>
		<ul id="classChildTemplate" class="sys-template">
			<li>{{ name }}</li>
		</ul>
	</div>
</body>
</html>
